/* ------------------------------------------------------------------------
** Includes
** ------------------------------------------------------------------------ */
#define _CRTDBG_MAP_ALLOC
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>

#include "../../common/cae_intf.h"

/* ------------------------------------------------------------------------
** Macros
** ------------------------------------------------------------------------ */
#define INPUT_FILE_MIC1 "../../../test/mute.wav"//"./test_raw0.pcm"
#define INPUT_FILE_MIC2 "../../../test/Sine1k_48k_16b.wav"//"./test_raw0.pcm"
#define INPUT_FILE_REF1 "../../../test/swp_48k_16b.wav"//"./test_ref0.pcm"
#define INPUT_FILE_REF2 "../../../test/white_noise.wav"//"./test_ref1.pcm"
/* ------------------------------------------------------------------------
** Global variable
** ------------------------------------------------------------------------ */
CAE_HANDLE cae = NULL; 
static FILE * finput_mic1 = NULL;
static FILE * finput_mic2 = NULL;
static FILE * finput_ref1 = NULL;
static FILE * finput_ref2 = NULL;

typedef struct _CAEUserData{
	FILE *fp_out_VAD;
	FILE *fp_out_REC;
	int flag;
}CAEUserData;

int CAEAudioCb(CAE_HANDLE handle,const char *audiodata, unsigned int audiolen, void *userdata, void *reserved);

int CAEIvwAudioCb(CAE_HANDLE handle,const char *audiodata, unsigned int audiolen, void *userdata, void *reserved);

int CAEIvwCb(CAE_HANDLE handle,short angle, short beam, char* keyword, float power, short score, void *userdata, void *reserved);

